package com.test.design_pattern.strategy.demo1;

/**
 * @author : zhangwei
 * @date : 2020-07-22
 **/
public class Profit {
    private ProfitStrategy profitStrategy;

    public Profit(ProfitStrategy profitStrategy) {
        this.profitStrategy = profitStrategy;
    }

    public double getProfit(double d){
        return this.profitStrategy.cal(d);
    }
}
